<template>
    <div id="xzList" v-show="curIsXZList">
        <el-radio-group v-model="curRadioList" @change="changeRadioBox">
            <el-radio label="110112119000">潞城镇</el-radio>
            <el-radio label="110112106000">漷县镇</el-radio>
            <el-radio label="110112104000">宋庄镇</el-radio>
            <el-radio label="110112110000">西集镇</el-radio>
            <el-radio label="110112114000">台湖镇</el-radio>
            <el-radio label="110112002000">新华街道</el-radio>
            <el-radio label="110112005000">永顺地区</el-radio>
            <el-radio label="110112006000">梨园地区</el-radio>
            <el-radio label="110112001000">中仓街道</el-radio>
            <el-radio label="110112003000">北苑街道</el-radio>
            <el-radio label="110112004000">玉桥街道</el-radio>
            <el-radio label="110112109000">马驹桥镇</el-radio>
            <el-radio label="110112105000">张家湾镇</el-radio>
            <el-radio label="110112117000">永乐店镇</el-radio>
            <el-radio label="110112209000">于家务回族乡</el-radio>
        </el-radio-group>
    </div>
</template>

<script>
export default {
    name:'XZList',
    computed:{
        // 是否展示
        curIsXZList(){
            return this.$store.getters.curIsXZList
        },
        curRadioList:{
            get(){
                // 这里有一个判断 默认加载不能是0 的问题 在options点击菜单时进行了判断
                // console.log(this.$store.getters.curGetOptions.code)
                return this.$store.getters.curGetOptions.code
            },
            set(val){
                this.$store.state.getOptions.code = val
            }
        }
    },
    methods:{
        changeRadioBox(val){
            this.$store.dispatch('changeCode',val)
        }
    }
}
</script>

<style lang="stylus" scoped>
#xzList
    position absolute
    z-index 50
    right 33%
    top 15px
    width 106px
    background linear-gradient(to right, rgba(62,73,103,0.7), #303a58)
    padding 5px 10px 
    text-align left
    
    /deep/ .el-radio, .el-radio-button__inner
        color #dbdee2

    /deep/ .el-radio__input.is-checked .el-radio__inner, .el-radio__input.is-indeterminate .el-radio__inner
        background-color #13ffd7
        border-color #13ffd7

    /deep/ .el-radio__input.is-checked+.el-radio__label
        color #13ffd7
</style>
